<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%--
代码为自动生成 Created by www.magicalcoder.com
 如果你改变了此类 read 请将此行删除
 欢迎加入官方QQ群:323237052
--%>
<!DOCTYPE html>
<html>
<head>
    <%@include file="../../common/head.jsp"%>
    <title>管理员表列表</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <%@include file="../include/head.jsp"%>
</head>
<body class="skin-blue">
<header class="header">
    <%@include file="../include/top.jsp"%>
</header>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <aside class="left-side sidebar-offcanvas">
        <%@include file="../include/left.jsp"%>
    </aside>
    <aside class="right-side">
        <section class="content-header">
            <h1>
                管理员表列表 
                <c:if test="${ adminPriority!=null && adminPriority.canInsert}">
                    <a class="btn btn-app" href="admin/admin_user/detail"><i class="fa fa-plus-square-o"></i>新增</a>
                </c:if>
            </h1>
            <ol class="breadcrumb">
                <li><a href="admin/index"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li class="active">管理员表列表</li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header ui-sortable-handle">
                            <i class="fa fa-search"></i>
                            <h3 class="box-title">查询区域</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button>
                                <button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                        <div class="box-body">
                            <div class="box-tools">
                                <div class="form">
                                    <div class="box-body">
                                        <div class="row">

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="idFirst">主键 (=)</label>
                                                    <input type="text" class="form-control" id="idFirst" name="idFirst" value="${ idFirst }" >
                                                </div>
                                            </div>

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="userNameFirst">用户名 (like)</label>
                                                    <input type="text" class="form-control" id="userNameFirst" name="userNameFirst" value="${ userNameFirst }" >
                                                </div>
                                            </div>

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="realNameFirst">真名 (like)</label>
                                                    <input type="text" class="form-control" id="realNameFirst" name="realNameFirst" value="${ realNameFirst }" >
                                                </div>
                                            </div>

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="emailFirst">邮箱 (=)</label>
                                                    <input type="text" class="form-control" id="emailFirst" name="emailFirst" value="${ emailFirst }" >
                                                </div>
                                            </div>

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="createTimeFirst"> 创建时间 (>=)</label>
                                                    <input  type="text" class="Wdate form-control" style="min-width: 170px;" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<c:out value='${ createTimeFirst }' escapeXml="false"/>" id="createTimeFirst" name="createTimeFirst">
                                                </div>
                                            </div>

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="createTimeSecond"> 创建时间 (<=)</label>
                                                    <input  type="text" class="Wdate form-control" style="min-width: 170px;" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<c:out value='${ createTimeSecond }' escapeXml="false"/>" id="createTimeSecond" name="createTimeSecond">
                                                </div>
                                            </div>

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="updateTimeFirst"> 更新时间 (>=)</label>
                                                    <input  type="text" class="Wdate form-control" style="min-width: 170px;" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<c:out value='${ updateTimeFirst }' escapeXml="false"/>" id="updateTimeFirst" name="updateTimeFirst">
                                                </div>
                                            </div>

                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="updateTimeSecond"> 更新时间 (<=)</label>
                                                    <input  type="text" class="Wdate form-control" style="min-width: 170px;" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<c:out value='${ updateTimeSecond }' escapeXml="false"/>" id="updateTimeSecond" name="updateTimeSecond">
                                                </div>
                                            </div>
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="superAdminFirst">是否超级管理员</label>
                                                    <select class="form-control single-select2-basic" id="superAdminSecond" name="superAdminSecond">
                                                        <option value="0">否</option>
                                                        <option value="1">是</option>
                                                    </select>
                                              </div>
                                            </div>                                             <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="roleIdFirst">角色</label>
                                                    <select multiple="multiple" class="form-control multiple-select2-ajax" id="roleIdFirst"  name="roleIdFirst" foreignTableName="role" foreignJavaField="id" selectValue="" values="" openUrl="admin/role/detail_param?id="></select>
                                                </div>
                                            </div>
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="querySubmit">&nbsp;</label>
                                                    <button class="btn btn-primary form-control" id="querySubmit">查询</button>
                                                </div>
                                            </div>

                                            <input type="hidden" id="pageIndex" name="pageIndex"  value="1">
                                            <input type="hidden" id="pageCount" name="pageCount" value="0">
                                            <input type="hidden" id="orderBySqlField" name="orderBySqlField" value="">
                                            <input type="hidden" id="descAsc" name="descAsc" value="">
                                            <input type="hidden" id="queryParamCacheKey" name="queryParamCacheKey" value="${queryParamCacheKey}">
                                            <input type="hidden" id="focusTrId" name="focusTrId" value="${focusTrId}">
                                            <input type="hidden" id="canDelete"  value="${adminPriority.canDelete}">
                                            <input type="hidden" id="canUpdate"  value="${adminPriority.canUpdate}">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box collapsed-box">
                        <div class="box-header ui-sortable-handle">
                            <i class="fa fa-th"></i>
                            <h3 class="box-title">工具箱</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-plus"></i></button>
                                <button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                        <div class="box-body" style="overflow: hidden; display: none;">
                            <div class="box-tools">
                                <div class="form">
                                    <div class="row">
                                        <c:if test="${ adminPriority!=null && adminPriority.canDelete }">
                                            <div class="col-lg-1">
                                                <div class="form-group">
                                                    <input id="batchDeleteItem" class="form-control btn btn-sm btn-danger" type="button" onclick="batchDeleteItem('admin_user')" value="批量删除">
                                                </div>
                                            </div>
                                        </c:if>
                                        <c:if test="${ adminPriority!=null && adminPriority.canTruncate}">
                                            <div class="col-lg-1">
                                                <div class="form-group">
                                                    <input class="form-control btn btn-sm btn-danger" type="button" onclick="truncateTable('admin_user')" value="清空数据">
                                                </div>
                                            </div>
                                        </c:if>
                                        <c:if test="${ adminPriority!=null && adminPriority.canInsert}">
                                            <div class="col-lg-1">
                                                <div class="form-group">
                                                    <input class="form-control btn btn-sm btn-danger" type="button" onclick="batchCopyItem('admin_user')" value="批量复制">
                                                </div>
                                            </div>
                                        </c:if>
                                        <c:if test="${ adminPriority!=null && adminPriority.canUpdate}">
                                            <div class="col-lg-1">
                                                <div class="form-group">
                                                    <button class="form-control btn btn-sm btn-danger" data-toggle="modal" data-target="#batchUpdateModal">批量更新</button>
                                                    <!-- 模态框（Modal） -->
                                                    <div class="modal fade" id="batchUpdateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                                        <div class="modal-dialog">
                                                            <div class="modal-content">
                                                                <div class="modal-header">
                                                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                                                        &times;
                                                                    </button>
                                                                    <h4 class="modal-title" id="myModalLabel">
                                                                        选中的记录将会被全部更新(空或者未选择的表单字段更新时将被忽略)
                                                                    </h4>
                                                                </div>
                                                                <div class="modal-body" >
                                                                    <div class="box-body form-horizontal">
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">用户名</label>
                                                                            <div class="col-sm-7"><input type="text" name="userName"  class="form-control"  title="用户名" placeholder="请输入用户名"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">密码</label>
                                                                            <div class="col-sm-7"><input type="text" name="password"  class="form-control"  title="密码" placeholder="请输入null"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">真名</label>
                                                                            <div class="col-sm-7"><input type="text" name="realName"  class="form-control"  title="真名" placeholder="请输入真名"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">邮箱</label>
                                                                            <div class="col-sm-7"><input type="text" name="email"  class="form-control"  title="邮箱" placeholder="请输入邮箱"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">座机号</label>
                                                                            <div class="col-sm-7"><input type="text" name="telephone"  class="form-control"  title="座机号" placeholder="请输入座机号"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">手机号</label>
                                                                            <div class="col-sm-7"><input type="text" name="mobilePhone"  class="form-control"  title="手机号" placeholder="请输入手机号"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">地址</label>
                                                                            <div class="col-sm-7"><input type="text" name="address"  class="form-control"  title="地址" placeholder="请输入手机号"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">创建时间</label>
                                                                            <div class="col-sm-7"><input type="text" name="createTime"   class="Wdate form-control" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" pattern="yyyy-MM-dd HH:mm:ss" style="min-width: 170px;"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">更新时间</label>
                                                                            <div class="col-sm-7"><input type="text" name="updateTime"   class="Wdate form-control" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" pattern="yyyy-MM-dd HH:mm:ss" style="min-width: 170px;"/></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">角色</label>
                                                                             <div class="col-sm-7"><select class="form-control single-select2-ajax" name="roleId"  foreignTableName="role" foreignJavaField="id" selectValue="" values="${adminUser.roleId}" openUrl="admin/role/detail_param?id="></select></div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                        <div class="form-group">
                                                                            <label class="col-sm-3 control-label">是否超级管理员</label>
                                                                             <div class="col-sm-7" style="min-width:250px">
                                                                                <select class="form-control"  name="superAdmin"  title="是否超级管理员"  >
                                                                                    <option value="" >全部</option>
                                                                                    <option value="0" >否</option>
                                                                                    <option value="1" >是</option>
                                                                                </select>
                                                                            </div>
                                                                            <label class="col-sm-2 control-label" ><span class="validateMsg"></span></label>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="modal-footer">
                                                                    <button type="button" class="btn btn-default" id="closeBatchUpdateModal" data-dismiss="modal">关闭
                                                                    </button>
                                                                    <button type="button" class="btn btn-primary" onclick="batchUpdateItem('admin_user')">
                                                                        提交更改
                                                                    </button>
                                                                </div>
                                                            </div><!-- /.modal-content -->
                                                        </div><!-- /.modal -->
                                                    </div>
                                                </div>
                                            </div>
                                        </c:if>

                                        <div class="col-lg-1">
                                            <div class="form-group">
                                                <label>导出:</label>
                                            </div>
                                        </div>
                                        <div class="col-lg-1">
                                            <div class="form-group">
                                                <input type="text" class="form-control" size="2" name="start"  id="start" value="0" title="第几行" placeholder="第几行">
                                            </div>
                                        </div>
                                        <div class="col-lg-1">
                                            <div class="form-group">
                                                <input type="text"  class="form-control" size="2" name="limit" id="limit" value="20" title="每页行数,分页最大100行,导出不限制" placeholder="每页行数">
                                            </div>
                                        </div>

                                        <c:if test="${ adminPriority!=null && adminPriority.canExport}">
                                        <div class="col-lg-1">
                                            <div class="form-group">
                                                <input type="button" class="form-control btn btn-sm btn-info" onclick="exportFile('excel')" value="EXCEL导出">
                                            </div>
                                        </div>
                                            <div class="col-lg-1">
                                                <div class="form-group">
                                                    <input type="button" class="form-control btn btn-sm btn-info" onclick="exportFile('json')" value="JSON导出">
                                                </div>
                                            </div>
                                        </c:if>

                                        <c:if test="${ adminPriority!=null && adminPriority.canImport}">
                                        <div class="col-lg-1">
                                            <div class="form-group">
                                                <label title="支持excel和json">导入:</label>
                                            </div>
                                        </div>
                                        <div class="col-lg-1">
                                            <div class="form-group">
                                                <input type="file" id="importJsonFile" class="form-control btn btn-sm btn-danger" name="myfiles" onchange="importJsonFile('admin/admin_user/import')"/>
                                            </div>
                                        </div>
                                        </c:if>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box">
                        <div class="box-header ui-sortable-handle">
                            <i class="fa fa-table"></i>
                            <h3 class="box-title">查询结果</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button>
                                <button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                        <div class="box-body table-responsive" style="overflow: auto">
                            <table id="example2" class="table table-bordered table-hover dataTable">
                                <thead id="thead">
                                    <tr>
                                        <th><input type="checkbox" id="checkAll"></th>
                                        <th>序号</th>
                                        <th  class="sorting" orderField="id">主键</th>
                                        <th  class="sorting" orderField="user_name">用户名</th>
                                        <th  class="sorting" orderField="real_name">真名</th>
                                        <th  class="sorting" orderField="email">邮箱</th>
                                        <th  class="sorting" orderField="update_time">更新时间</th>
                                        <th  class="sorting" orderField="role_id">角色</th>
                                        <th  class="sorting" orderField="super_admin">是否超级管理员</th>
                                        <th  class="sorting" orderField="create_time">创建时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="tbody"></tbody>
                                <tfoot></tfoot>
                            </table>
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <div class="row">
                                <div class="col-lg-12">
                                    <div class="dataTables_paginate paging_bootstrap">
                                        <ul class="pagination" id="pagination">
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-footer -->
                    </div>
                    <!-- /.box -->
                </div>
            </div>

            <c:if test="${ adminPriority!=null && adminPriority.canStatistics}">
            <!-- statistics begin-->
            <!--基础统计汇总日期创建记录-->
            <div class="row">
                <div class="col-xs-12">
                    <div class="box  collapsed-box">
                        <div class="box-header ui-sortable-handle">
                            <i class="fa fa-area-chart"></i>
                            <h3 class="box-title">日期汇总统计</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-plus"></i></button>
                                <button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                        <div class="box-body" style="overflow: hidden; display: none;">
                            <div class="box-tools">
                                <div class="form">
                                    <div class="box-body">
                                        <div class="row">
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupDateCountBySqlField">时间分组</label>
                                                    <select class="form-control" id="groupDateCountBySqlField" name="groupDateCountBySqlField">
                                                            <option value="create_time">创建时间</option>
                                                            <option value="update_time">更新时间</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupDateCountByPrecision">时间精度</label>
                                                    <select class="form-control" id="groupDateCountByPrecision" name="groupDateCountByPrecision">
                                                        <option value="3">日</option>
                                                        <option value="2">月</option>
                                                        <option value="1">年</option>
                                                        <option value="4">时</option>
                                                        <option value="5">分</option>
                                                        <option value="6">秒</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupDateCountStatistics">&nbsp;</label>
                                                    <button class="btn btn-primary form-control" id="groupDateCountStatistics">统计</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-body" id="groupDateCountStatisticsDiv">

                        </div>

                    </div>
                </div>
            </div>
            <!--基础统计间隔日期创建记录-->
            <div class="row">
                <div class="col-xs-12">
                    <div class="box  collapsed-box">
                        <div class="box-header ui-sortable-handle">
                            <i class="fa fa-area-chart"></i>
                            <h3 class="box-title">产生相邻两条记录的间隔时间统计</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-plus"></i></button>
                                <button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                        <div class="box-body" style="overflow: hidden; display: none;">
                            <div class="box-tools">
                                <div class="form">
                                    <div class="box-body">
                                        <div class="row">
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupDateIntervalBySqlField">时间分组</label>
                                                    <select class="form-control" id="groupDateIntervalBySqlField" name="groupDateIntervalBySqlField">
                                                        <option value="create_time">创建时间</option>
                                                        <option value="update_time">更新时间</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupDateIntervalByPrecision">时间精度</label>
                                                    <select class="form-control" id="groupDateIntervalByPrecision" name="groupDateIntervalByPrecision">
                                                        <option value="6">秒</option>
                                                        <option value="5">分</option>
                                                        <option value="4">时</option>
                                                        <option value="3">日</option>
                                                        <option value="2">月</option>
                                                        <option value="1">年</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupDateIntervalStatistics">&nbsp;</label>
                                                    <button class="btn btn-primary form-control" id="groupDateIntervalStatistics">统计</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-body" id="groupDateIntervalStatisticsDiv">

                        </div>

                    </div>
                </div>
            </div>
            <!--基础统计自定义横坐标-->
            <div class="row">
                <div class="col-xs-12">
                    <div class="box  collapsed-box">
                        <div class="box-header ui-sortable-handle">
                            <i class="fa fa-bar-chart"></i>
                            <h3 class="box-title">自定义横坐标分组统计</h3>
                            <div class="box-tools pull-right">
                                <button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-plus"></i></button>
                                <button type="button" class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button>
                            </div>
                        </div>
                        <div class="box-body" style="overflow: hidden; display: none;">
                            <div class="box-tools">
                                <div class="form">
                                    <div class="box-body">
                                        <div class="row">
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupBySqlField">分组</label>
                                                    <select class="form-control" id="groupBySqlField" name="groupBySqlField">
                                                        <option value="id">主键</option>
                                                        <option value="user_name">用户名</option>
                                                        <option value="password">密码</option>
                                                        <option value="real_name">真名</option>
                                                        <option value="email">邮箱</option>
                                                        <option value="telephone">座机号</option>
                                                        <option value="mobile_phone">手机号</option>
                                                        <option value="address">地址</option>
                                                        <option value="super_admin">是否超级管理员</option>
                                                        <option value="role_id">角色</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="col-lg-2">
                                                <div class="form-group">
                                                    <label for="groupStatistics">&nbsp;</label>
                                                    <button class="btn btn-primary form-control" id="groupStatistics">统计</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-body" id="groupStatisticsDiv">

                        </div>
                        <div class="box-footer">
                            <div class="form-group ">
                                <label class="col-sm-3 control-label"></label>
                                <div class="col-sm-9">
                                    <label type="text"  id="groupStatisticsName" value=""></label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- statistics end-->
            </c:if>
        </section>
        <!-- /.content -->
    </aside>
    <!-- /.right-side -->
</div>
<!-- ./wrapper -->
<%@include file="../include/tail.jsp"%>
<script src="assets/admin/app/adminuser/adminUserPaging.js" type="text/javascript"></script>
<script type="text/javascript" >
    function resetDefaultValue() {
        //外键下拉==========begin=========//
        initSingleSelect2Ajax($(".form"))
        autoSetSingleSelect2Value($(".form"))
        initMultipleSelect2Ajax($(".form"))
        autoSetMultipleSelect2Value($(".form"))
        //外键下拉==========end========//
        getItemPage()
        initOrderBy()
        bindOrderByEvent()

    }
    $(function(){
        $(".multiple-select2-basic").select2()
        initSingleSelect2Ajax($(".form"))
        autoSetSingleSelect2Value($(".form"))
        initSingleSelect2Ajax($("#batchUpdateModal"))
        autoSetSingleSelect2Value($("#batchUpdateModal"))
        initMultipleSelect2Ajax($(".form"))
        autoSetMultipleSelect2Value($(".form"))
    //分页相关==========begin==========//
        restoreBuildQueryParam($("#queryParamCacheKey").val(),resetDefaultValue)
        //查询
        $("#querySubmit").click(function(){
            $("#pageIndex").val("1")
            $("#pageCount").val("0")
            buildQueryParamCacheKeyAndSetCache(buildReqParam(),"queryParamCacheKey",getItemPage)
        })
        //批量删除
        bindCheckAllEvent();
        //批量表单验证
        validateForm2($("#batchUpdateModal"))
    //分页相关==========end==========//
    //统计=============begin==========//
        $("#groupDateCountStatistics").click(function(){
            var start = $("#start").val()
            var limit = $("#limit").val()
            var groupDateCountBySqlField = $("#groupDateCountBySqlField").val()
            if(groupDateCountBySqlField==''){
                alert("无日期字段，不支持日期汇总统计，请使用其他统计功能")
                return
            }
            var reqParam = buildReqParam();
            reqParam.groupDateCountBySqlField=groupDateCountBySqlField
            reqParam.groupDateCountByPrecision=parseInt($("#groupDateCountByPrecision").val())
            groupDateCountStatistics("admin_user","groupDateCountStatisticsDiv",start,limit,reqParam);
        })
        $("#groupDateIntervalStatistics").click(function(){
            var start = $("#start").val()
            var limit = $("#limit").val()
            var groupDateIntervalBySqlField = $("#groupDateIntervalBySqlField").val()
            if(groupDateIntervalBySqlField==''){
                alert("无日期字段，不支持日期间隔频率统计，请使用其他统计功能")
                return
            }
            var reqParam = buildReqParam();
            reqParam.groupDateIntervalBySqlField=groupDateIntervalBySqlField
            var groupDateIntervalByPrecision=parseInt($("#groupDateIntervalByPrecision").val())
            groupDateIntervalStatistics("admin_user","groupDateIntervalStatisticsDiv",start,limit,reqParam,groupDateIntervalByPrecision);
        })
        $("#groupStatistics").click(function(){
            var start = $("#start").val()
            var limit = $("#limit").val()
            var reqParam = buildReqParam();
            reqParam.groupBySqlField=$("#groupBySqlField").val()
            groupStatisticsDiv("admin_user","groupStatisticsDiv",start,limit,reqParam,"groupStatisticsName");
        })
    //统计=============end============//
    })
</script>
</body>
</html>
